package ModelLayer;

import java.text.SimpleDateFormat;

public class Copy
{
    private long serialNumber;
    private long purchaseDate;
    private long purchasePrice;
    private DVD dvd;
    private String status;

    public Copy(long serialNumber, long purchaseDate, long purchasePrice, DVD dvd)
    {
        this.serialNumber = serialNumber;
        this.purchaseDate = purchaseDate;
        this.purchasePrice = purchasePrice;
        this.dvd = dvd;
        this.status = "Available";
    }

    public void setSerialNumber(long serialNumber)
    {
        this.serialNumber = serialNumber;
    }

    public long getSerialNumber()
    {
        return serialNumber;
    }

    public void setPurchaseDate(long purchaseDate)
    {
        this.purchaseDate = purchaseDate;
    }

    public long getPurchaseDate()
    {
        return purchaseDate;
    }

    public void setPurchasePrice(long purchasePrice)
    {
        this.purchasePrice = purchasePrice;
    }

    public long getPurchasePrice()
    {
        return purchasePrice;
    }

    public void printCopyInfo()
    {
        SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
        System.out.println("Serial Number: " + serialNumber);
        System.out.println("Purchase Date: " + formatter.format(purchaseDate));
        System.out.println("Purchase Price: " + purchasePrice);
        System.out.println("Status: " + status);
        System.out.println("");
    }

    public void setSts(String status)
    {
        this.status = status;
    }

    public String getSts()
    {
        return status;
    }

    public void setDVD(DVD dvd)
    {
        this.dvd = dvd;
    }

    public DVD getDVD()
    {
        return dvd;
    }

}
        